/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.lane.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import com.thinkgem.jeesite.modules.area_info_yesterday.entity.AreaInfoYesterday;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.lane.entity.Lane;
import com.thinkgem.jeesite.modules.lane.dao.LaneDao;

/**
 * 车道信息Service
 * @author xlp
 * @version 2019-04-12
 */
@Service
@Transactional(readOnly = true)
public class LaneService<list> extends CrudService<LaneDao, Lane> {
	@Autowired
	private  LaneDao laneDao;


	public Lane get(String id) {
		return super.get(id);
	}
	
	public List<Lane> findList(Lane lane) {
		return super.findList(lane);
	}
	
	public Page<Lane> findPage(Page<Lane> page, Lane lane) {
		return super.findPage(page, lane);
	}
	
	@Transactional(readOnly = false)
	public void save(Lane lane) {
		super.save(lane);
	}
	
	@Transactional(readOnly = false)
	public void delete(Lane lane) {
		super.delete(lane);
	}
//获取停车区域的车位空余数
	public List<Lane> surplusCar(){
		return  laneDao.surplusCar();
	}


	public AreaInfoYesterday getTotalRemainSpace(String areaId) {
		return laneDao.getTotalRemainSpace(areaId);
	}
}